home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
oper_sys
/
oasis
/
ossxmpls.lha
/
examples
/
ack.c
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1992-03-25
|
209 b
|
17 lines
/* C version of ack benchmark */
#include <stdio.h>
int ack(m,n)
int m,n;
{
if (m == 0) return n+1;
if (n == 0) return ack(m-1,1);
return ack(m-1,ack(m,n-1));
}
main()
{
printf("%d\n", ack(3,8));
}